default background and foreground for inline code in dark mode #13182
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Default inline code background color, both with and with and without
sourceCode
, to the block background color and not$grey-100
Fixes #8568
It leaves the inline code foreground color defaulted to purple in light mode, which seems to be intentional. In dark mode, it uses
$pre-color
which exists in that mode.I think the fix is correct and safe but it may be more convoluted than we want.
The problem is,
$code-bg
, which controls the inline code background color, has a bad default for dark mode of$gray-100
(in_bootstrap-variables.scss
) but the way to calculate the correct color for dark mode is not known until_bootstrap-rules.scss
.I couldn't
!default
it, or set it outright, so Claude suggested this kludge of checking if$code-bg
has its default setting. 😛I have tested this manually
brand.typography.monospace-inline.background-color
(which is the current workaround for the original bug).No warnings.
Includes playwright tests for a11y and arrow themes.
Visual design considerations
This is the minimal change, but
git blame
, it took a while to settle on this color.)